#!/usr/bin/env zsh

is_annex() {
  local annex="zinit-annex-${1}"
  run zinit load zdharma-continuum/${annex}
  assert ${state} equals 0
  zinit cd zdharma-continuum/${annex}
  assert ${PWD}/${${annex}//zinit-annex/z-a}.plugin.zsh is_file
  assert ${PWD}/${${annex}//zinit-annex/z-a}.plugin.zsh is_readable
}
